package day03;

import java.util.Arrays;

/**
 * Created by MGL on 2017/4/4.
 */
public class Test05 {
    public static void main(String[] args) {
        int[] arr = new int[]{1, 9, 10, 5, 11, 2, 13};
        int len = 1;
        int[] d = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j <= i; j++) {
                if (arr[j] < arr[i] && d[i] < d[j] + 1) {
                    d[i] = d[j] + 1;
                }
            }
            if (len < d[i]) {
                len = d[i];
            }
        }
        System.out.println(Arrays.toString(d));
        System.out.println(len + 1);
    }


}
